#include <iostream>
#include <string>
using namespace std;

class Dog{
public:
  string name;
  int age;
  string color;
  string type;
  double weight;
};


void feedDog(Dog &dog){
  dog.weight+=1;
  cout<<"喂"<<dog.name<<"吃了一块骨头"<<endl;
}

int main(){
  Dog dog1;
  // 给变量的成员赋值
  dog1.age=1;
  dog1.color="黄色";
  dog1.name="旺财";
  dog1.type="田园犬";
  dog1.weight=5.5;


  cout<<"name:"<<dog1.name<<endl;
  cout<<"color:"<<dog1.color<<endl;   
  
  // 喂养旺财
  cout<<"准备喂养"<<dog1.name<<"，喂前体重"<<dog1.weight<<endl;
  feedDog(dog1);
  cout<<"喂完"<<dog1.name<<"，喂后体重"<<dog1.weight<<endl;
  return 0;
}